﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
namespace DAL
{
    
   public  class UgoodsDAL
    {
        DBHelper db = new DBHelper();
        public DataTable showUgoods()  //显示用户的商品表
        {
            string sql = string.Format("select * from Goods ");
            return db.cx(sql);
        }
        public int up(int sum,int id) {
            string sql = string.Format("UPDATE [dbo].[Goods]SET  [goodsnum] = '{0}'WHERE id='{1}'",sum,id);
            int a = db.zsg(sql);
            return a;
        }
    }
}
